public class OverLoadExercise {

    public static void main(String[] args) {

        Methods methods = new Methods();
        methods.m(6);

        methods.m("喊孙鹏");
        methods.m(10,20);


        System.out.println(methods.max(1.2,5.3,6.6));
        System.out.println(methods.max(1.2,2.1));
        System.out.println(methods.max(19999999,222));
        System.out.println(methods.max('a','z'));
    }


}

class Methods {

    public void m(int i){
        System.out.println("int======》》"+(i*i));
    }

    public void m(int i,int j){
        System.out.println("doubleNum======》》"+(i*j));
    }

    public void m(String i){
        System.out.println("string======》》"+i);
    }


    public int max(int i,int j ){
        return i>j?i:j;
    }

    public double max(double i, double j){
        return i>j?i:j;
    }

    public char max(char i, char j){
        return i>j?i:j;
    }
    public double max(double i, double j,double z){
        if (i>j&&i>z){
            return i;
        }else if (j>z){
            return j;
        }else {
            return z;
        }
    }

}